package zhupf.test.designPattern.factory.factoryMethod;

public class BJOrderPizza extends OrderPizza {
    @Override
    Pizza createPizza(String type) {
        if (type == null){
            return null;
        }
        if (type.equals("cheese")){
            return new BJCheesePizza();
        }
        if (type.equals("pepper")) {
            return new BJPepperPizza();
        }
        return null;
    }
}
